package com.faya.green.service.impl;

import com.faya.green.dao.sys.SysLogDao;
import com.faya.green.model.SysLog;
import com.faya.green.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：LX
 * 创建时间： 2018/10/31. 17:37
 * 地点：广州
 * 目的: 系统日志
 * 备注说明：
 */
@Service
public class SysLogServiceImpl implements SysLogService {

    //压制全部警告
    @SuppressWarnings("all")
    @Autowired
    private SysLogDao sysLogDao;


    @Transactional(rollbackFor = Exception.class)
    @Override
    public void updateSysLog(SysLog sysLog) {
        sysLogDao.updateSysLog(sysLog);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void addSysLog(SysLog sysLog) {
        sysLogDao.addSysLog(sysLog);
    }

    @Override
    public SysLog getSysLogById(String id) {
        return sysLogDao.getSysLogById(id);
    }
}
